package com.weixin.dao;

import java.sql.SQLException;
import java.util.List;

import com.weixin.entity.Supplier;

public interface ISupplierDao {
	/**
	 * 查询所有供应商信息
	 * @return
	 * @throws SQLException
	 */
	public List<Supplier> selectAll() throws SQLException;
	/**
	 * 查询所有并分页
	 * @param pageSize
	 * @param pageNum
	 * @return
	 * @throws SQLException
	 */
	public List<Supplier> selectAllByPagination(int pageSize,int pageNum) throws SQLException;
	/**
	 * 得到供应商的总数据条数
	 * @return
	 * @throws SQLException
	 */
	public int getAllTotal()throws SQLException;
	/**
	 * 根据id查找供应商信息
	 * @param supplire_id
	 * @return
	 * @throws SQLException
	 */
	public Supplier selectById(int supplier_id) throws SQLException;
	/**
	 * 添加供应商信息
	 * @param supplier
	 * @return
	 * @throws SQLException
	 */
	public boolean addSupplier(Supplier supplier)throws SQLException;
	/**
	 * 修改供应商信息
	 * @param supplier
	 * @return
	 * @throws SQLException
	 */
	public boolean editSupplier(Supplier supplier)throws SQLException;
	/**
	 * 根据id删除供应商信息
	 * @param supplier_id
	 * @return
	 * @throws SQLException
	 */
	public boolean moveById(int supplier_id) throws SQLException;
	/**
	 * 根据输入值模糊查询所有列
	 * @param search
	 * @return
	 * @throws SQLException
	 */
	public List<Supplier> getForSearch(String search)throws SQLException;
}
